#include "pv.h"

PyDoc_STRVAR(display_doc,
"Event Type");

static PyObject *
display_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
	return type->tp_alloc(type, 0);
}

static int
display_init(PvDisplay *self, PyObject *args, PyObject *kwds)
{
	return 0;
}

static void
display_dealloc(PyObject *self)
{
}

static PyObject *
display_mainloop(PyObject *self)
{
	MSG		msg;
	int		ret;

	while ((ret = GetMessage(&msg, NULL, 0, 0)) != 0) {
		if (ret == -1) {
		} else {
			TranslateMessage(&msg);
			DispatchMessage(&msg);
		}
	}
}

static PyMemberDef display_members[] = {
//	{"type", T_INT, offsetof(PvDisplay, type), 0, 
//		"Type of the event"},
	{NULL}
};

static PyMethodDef display_methods[] = {
//	{"getwindows", (PyCFunction)display_getwindows, METH_NOARGS | METH_STATIC,
//		display_getwindows_doc},
	{NULL, NULL}
};


PyTypeObject PvDisplay_Type = {
	PyObject_HEAD_INIT(0)
        "pv.display",		/* tp_name */
        sizeof(PvDisplay),		/* tp_basicsize */
        0,				/* tp_itemsize */
        display_dealloc,		/* tp_dealloc */
        0,				/* tp_print */
        0,				/* tp_getattr */
        0,				/* tp_setattr */
        0,				/* tp_reserved */
        0,				/* tp_repr */
        0,				/* tp_as_number */
        0,				/* tp_as_sequence */
        0,				/* tp_as_mapping */
        0,				/* tp_hash */
        0,				/* tp_call */
        0,				/* tp_str */
        PyObject_GenericGetAttr,	/* tp_getattro */
        0,				/* tp_setattro */
        0,				/* tp_as_buffer */
        Py_TPFLAGS_DEFAULT,		/* tp_flags */
        display_doc,		/* tp_doc */
        0,				/* tp_traverse */
        0,				/* tp_clear */
        0,				/* tp_richcompare */
        0,				/* tp_weaklistoffset */
        0,				/* tp_iter */
        0,				/* tp_iternext */
        display_methods,		/* tp_methods */
        display_members,				/* tp_members */
        0,				/* tp_getset */
        0,				/* tp_base */
        0,				/* tp_dict */
        0,				/* tp_descr_get */
        0,				/* tp_descr_set */
        0,				/* tp_dictoffset */
        (initproc)display_init,				/* tp_init */
        0,				/* tp_alloc */
        display_new,				/* tp_new */
        0,				/* tp_free */
        0,				/* tp_is_gc */
};

